<?php

class Default_Model_DbTable_Posts extends Zend_Db_Table_Abstract
{

    protected $_name = 'posts';

	public function getByAuthor($authorId){
		$rows = $this->fetchAll("post_author = $authorId");
		if (!$rows) {
			throw new Exception("Could not find rows with author id = $authorId");
		}
		return $rows->toArray();
	}
}

